﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Best.SmartCms.API.Migrations
{
    public partial class editSetting : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<long>(
                name: "Id",
                table: "SiteSetting",
                nullable: false,
                oldClrType: typeof(string),
                oldMaxLength: 50)
                .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedTime",
                table: "SiteSetting",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatorId",
                table: "SiteSetting",
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatorName",
                table: "SiteSetting",
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "UpdatedTime",
                table: "SiteSetting",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UpdatorId",
                table: "SiteSetting",
                maxLength: 50,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UpdatorName",
                table: "SiteSetting",
                maxLength: 50,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreatedTime",
                table: "SiteSetting");

            migrationBuilder.DropColumn(
                name: "CreatorId",
                table: "SiteSetting");

            migrationBuilder.DropColumn(
                name: "CreatorName",
                table: "SiteSetting");

            migrationBuilder.DropColumn(
                name: "UpdatedTime",
                table: "SiteSetting");

            migrationBuilder.DropColumn(
                name: "UpdatorId",
                table: "SiteSetting");

            migrationBuilder.DropColumn(
                name: "UpdatorName",
                table: "SiteSetting");

            migrationBuilder.AlterColumn<string>(
                name: "Id",
                table: "SiteSetting",
                maxLength: 50,
                nullable: false,
                oldClrType: typeof(long))
                .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
        }
    }
}
